package org.auf.controllers;

import java.io.IOException;

import org.apache.log4j.Logger;
import org.auf.core.Controller;

public class ShowLoginController extends Controller {

	static Logger log = Logger.getLogger(ShowLoginController.class.getName()); 
	
	@Override
	public void show() {
		
		if (user == null) {		
			view.load("login");
			view.show();
		}
		else {
			//TODO: La pagina principal cual era? xD
			try {
				response.sendRedirect(BaseURLs.MAIN_PAGE);
			} catch (IOException e) {
				log.error("Error al redigirigir a la pagina principal");
			}
		}
	}
}
